//
//  ContactsTableVewCell.m
//  聊吧
//
//  Created by 刘洋 on 16/6/13.
//  Copyright © 2016年 刘洋. All rights reserved.
//

#import "ContactsTableVewCell.h"

@implementation ContactsTableVewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

-(void)createSubviews{
    
    self.iconImage = [[BaseImageView alloc]init];
    self.iconImage.image = [UIImage imageNamed:@"head"];
    self.iconImage.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.iconImage];
    [_iconImage release];
    
    self.nameLabel = [[BaseLabel alloc]init];
    [self.contentView addSubview:self.nameLabel];
    [_nameLabel release];
    
    
    self.lineView = [[UIView alloc]init];
    self.lineView.backgroundColor = RGBAColor(220, 220, 220);
    [self.contentView addSubview:self.lineView];
    [_lineView release];
    
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    
    self.iconImage.frame = CGRectMake(10, 5, 50, 50);
    
    self.nameLabel.frame = CGRectMake(70, 15, 200, 30);
    
    self.lineView.frame = CGRectMake(10, 60, ROOTWIDTH - 20, 1);
    
}



@end
